package com.woniu.command.materialBomCommand;

import com.woniu.command.Command;
import com.woniu.command.handler.MaterialBomCommandHandler;
import com.woniu.utils.ApplicationContextHolder;

public class DeleteMaterialBomCommand implements Command<Long,Integer> {

    private MaterialBomCommandHandler handler;
    public DeleteMaterialBomCommand(){
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(MaterialBomCommandHandler.class);
    }
    @Override
    public Integer  execute(Long id) {
        return handler.deleteMaterialBomById(id);
    }
}
